package cos.android.tim.objects;

import java.util.Vector;

import android.graphics.Bitmap;
import cos.android.tim.element.Activable;
import cos.android.tim.element.Electric;
import cos.android.tim.element.ElectricGenerator;
import cos.android.tim.element.Element;
import cos.android.tim.element.Polygon;
import cos.android.tim.utils.Point;

public class Batery extends Element {

	public Batery(Bitmap sprite, Bitmap colisionSprite, Bitmap miniSprite,
			int xPos, int yPos, String kind) {
		super(sprite, colisionSprite, miniSprite, xPos, yPos, kind);
		this.setActivable(new Activable());
		refreshAristas();
		this.setElectricGenerator(new ElectricGenerator());
		this.setElectric(new Electric(false));

	}

	public void refreshAristas() {
		Vector<Point> aristas = new Vector<Point>();
		aristas.add(new Point(0, 0));
		aristas.add(new Point(getWidth(), 0));
		aristas.add(new Point(getWidth(), getHeight()));
		aristas.add(new Point(0, getHeight()));
		aristas.add(new Point(0, 0));
		this.setPolygon(new Polygon(aristas));
	}
}
